package com.smart.manager.system.entities.models;

import com.smart.common.entities.core.BaseLongModel;
import com.smart.manager.system.entities.views.OrganView;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

/**
 * 系统管理-部门管理
 *
 * @author Administrator
 */
@EqualsAndHashCode(callSuper = true)
@Entity
@Data
public class SystemDept extends BaseLongModel {


    @ApiModelProperty("部门代码")
    private String code;

    @ApiModelProperty("上级部门代码")
    private String parentCode;


    @ApiModelProperty("部门名称")
    private String name;


    @ApiModelProperty("部门全称")
    private String fullName;


    @ApiModelProperty("显示排序")
    private Integer sort;


    @ApiModelProperty("所属机构")
    @ManyToOne
    @JoinColumn(name = "organ" ,referencedColumnName = "code")
    private OrganView organ;


    @ApiModelProperty("值班电话")
    private String tel;

    @ApiModelProperty("部门负责人")
    private String master;
}
